<?php

namespace Jinxing\Admin\Composers;

use Illuminate\Contracts\View\View;

class DataTableComposer
{
    /**
     * Bind data to the view.
     *
     * @param View $view
     *
     * @return void
     * @throws \Exception
     */
    public function compose(View $view)
    {
        $suffix = '.js';
        $view->with([
            'tableCss'        => [
                'admin-assets/plugins/datatables/css/dataTables.bootstrap.min.css',
            ],
            'tableJavascript' => [
                'admin-assets/plugins/datatables/js/jquery.dataTables.min.js',
                'admin-assets/plugins/datatables/js/dataTables.bootstrap.min.js',
                'admin-assets/laravel-admin/jquery.meTables' . $suffix,
                'admin-assets/laravel-admin/laravel.admin' . $suffix,
            ],
        ]);
    }
}